Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Short timeout for cloud instance ID fetcher #1050

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

mariomac
Copy link
Contributor

The AWS Host ID fetcher was taking too much time to fail when executed on non-AWS resources.

This seems as an internal issue of the used library.

This PR times out the AWS fetcher to 500ms (timeout is configurable by the users).

The timeout should be more than enough to get the Cloud ID on AWS. I've tried it on real AWS and takes around ~4ms

@mariomac mariomac requested a review from rafaelroquetto July 23, 2024 10:16
@mariomac mariomac marked this pull request as ready for review July 23, 2024 10:16
@mariomac mariomac requested review from grcevski and marctc as code owners July 23, 2024 10:16
@codecov-commenter
Copy link

codecov-commenter commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 81.41%. Comparing base (f9a8d4b) to head (3d423c5).

Files Patch % Lines
pkg/internal/pipe/global/host_id.go 84.61% 2 Missing and 2 partials ⚠️
pkg/components/beyla.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1050      +/-   ##
==========================================
- Coverage   81.50%   81.41%   -0.10%     
==========================================
  Files         139      139              
  Lines       11113    11129      +16     
==========================================
+ Hits         9058     9061       +3     
- Misses       1543     1550       +7     
- Partials      512      518       +6     
Flag Coverage Δ
integration-test 56.60% <60.00%> (-0.28%) ⬇️
k8s-integration-test 58.90% <60.00%> (-0.14%) ⬇️
oats-test 37.45% <60.00%> (+0.03%) ⬆️
unittests 51.01% <76.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Sweet!

@mariomac mariomac merged commit 0ab3dc5 into grafana:main Jul 23, 2024
6 checks passed
@mariomac mariomac deleted the host-id-timeout branch July 23, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants